home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / tsca / tsca1.bas < prev    next >
BASIC Source File  |  1995-05-09  |  2KB  |  72 lines

  1. Global Const NPARTS = 50
  2. Global BasinLvl(2) As Integer
  3. Global caller As Integer
  4. Global centst As Integer
  5. Global dbstatus As Integer
  6. Global equipment(20) As String
  7. Global fault(20) As String
  8. Global jp As Integer
  9. Global jr As Integer
  10. Global part(NPARTS) As String
  11. Global partowner(NPARTS) As Integer
  12. Global pumpst(10) As Integer
  13. Global rakest As Integer
  14. Global valvest(2) As Integer
  15. Global whoa As Integer
  16.  
  17. Sub statusmanager (devicestat As Integer)
  18. DBStat.Show
  19. DBStat.Text1.Text = equipment(caller)
  20. If devicestat = 0 Then
  21.     DBStat.Text2.Text = "on"
  22.     DBStat.List1.Visible = 0
  23.     If fault(caller) <> "" Then
  24.         DBStat.Label1.Visible = -1
  25.         DBStat.Label1.Caption = fault(caller) + " repaired."
  26.         fault(caller) = ""
  27.     Else
  28.         DBStat.Label1.Visible = 0
  29.     End If
  30.  
  31. Else
  32.     DBStat.Text2.Text = "off"
  33.     partowner(caller) = 3
  34.     DBStat.Label1.Visible = -1
  35.     DBStat.Label1.Caption = "Select defective part."
  36.     
  37. End If
  38. End Sub
  39.  
  40. Sub stcentrifuge ()
  41. Dim i As Integer, j As Integer, k As Integer
  42. Dim ii As Integer
  43. j = 0
  44. k = 0
  45. centst = 0
  46. For i = 1200 To 0 Step -1
  47.     ii = i Mod 256
  48.     If i < 256 Then j = ii
  49.     If i <= 512 Then k = ii
  50.     tscamain.centrifuge.Line (i, 0)-(i, 840), RGB(j, k, ii)
  51. Next i
  52. End Sub
  53.  
  54. Sub stopcentrifuge ()
  55. Dim i As Integer, j As Integer, k As Integer, ii As Integer
  56. ii = 255
  57. j = 255
  58. k = 255
  59. For i = 0 To 720
  60.     If i > 125 Then
  61.         j = 380 - i
  62.         If j < 0 Then j = 0
  63.     End If
  64.     If i > 400 Then
  65.         ii = 655 - i
  66.         If ii < 0 Then ii = 0
  67.     End If
  68.     tscamain.centrifuge.Line (0, i)-(1200, i), RGB(j, j, ii)
  69. Next i
  70. End Sub
  71.  
  72.